<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <LINK rel="Bookmark" href="/favicon.ico">
    <LINK rel="Shortcut Icon" href="/favicon.ico"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="/Public/static/html5.js"></script>
    <script type="text/javascript" src="/Public/static/respond.min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/PIE_IE678.js"></script>
    <![endif]-->
    <link href="/Public/Admin/css/manager/H-ui.min.css" rel="stylesheet" type="text/css"/>
    <link href="/Public/Admin/css/manager/H-ui.admin.css" rel="stylesheet" type="text/css"/>
    <link href="/Public/Admin/css/skin/default/skin.css" rel="stylesheet" type="text/css"/>
    <link href="/Public/Admin/css/manager/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css"/>
    <link href="/Public/Admin/css/common.css" rel="stylesheet" type="text/css"/>
    <link href="/Public/Admin/css/application.css" rel="stylesheet" type="text/css"/>
    <title>后台</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <script type="text/javascript" src="/Public/static/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="/Public/static/layer/layer.js"></script>
    <script type="application/javascript" src="/Public/static/form/jquery.validate.min.js"></script>
    <script type="application/javascript" src="/Public/static/form/localization/messages_zh.min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/H-ui.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/H-ui.admin.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/common.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/jquery.raty.min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/timer.js"></script>
    <script type="text/javascript">
        $(function () {
            //搜索功能
            $("#search_layer").click(function () {
                layer.closeAll();
                layer.open({
                    type: 2,
                    title: 'id搜索工具',
                    shadeClose: true,
                    shade: false,
                    maxmin: true, //开启最大化最小化按钮
                    area: ['650px', '550px'],
                    content: '<?php echo U("/Admin/Doctor/NRDoctor/search");?>'
                });
            });
        })
    </script>
</head>
<div class="pd-20">
    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <?php if(!empty($actions)): if(isset($actions['CLASSIFYADD'])): ?><span class="l mr-10">
                    <a class="btn btn-primary radius"
                       href="<?php $str = $Think.ADMIN_PATH_NAME.$actions['CLASSIFYADD']['url'];echo U($str,array('key'=>$actions['CLASSIFYADD']['key']))?>">新增分类</a>
                 </span><?php endif; ?>
            <?php if(isset($actions['CLASSIFYDELETE'])): ?><span class="l mr-10">
                    <a class="btn btn-danger radius" href="javascript:"
                       _href="<?php $str = $Think.ADMIN_PATH_NAME.$actions['CLASSIFYDELETE']['url'];echo U($str,array('key'=>$actions['CLASSIFYDELETE']['key']))?>"
                       id="classifyDeleteBtn">批量删除</a>
                 </span><?php endif; endif; ?>
        <!-- 高级搜索 -->
        <div class="search-form fr cf">
            <div class="sleft">
                <input type="text" name="nickname" class="search-input" value="<?php echo I('nickname');?>"
                       placeholder="请输入用户昵称或者ID">
                <a class="sch-btn" href="javascript:" id="search"
                   url="<?php $key = I('request.key');echo U($Think.ADMIN_PATH_NAME.'Employee/User/index',array('key'=>$key));?>"><i
                        class="Hui-iconfont btn-search">&#xe665;</i></a>
            </div>
        </div>
    </div>


    <!-- 数据列表 -->

    <div class="mt-20">
        <div class="data-table table-striped">

            <table class="table table-border table-bordered table-bg table-sort">
                <thead>
                <tr class="text-c">
                    <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                    <th class="">一级分类</th>
                    <th class="">二级分类</th>
                    <th class="">三级分类</th>
                    <th class="">操作</th>
                </tr>
                </thead>
                <tbody>
                <?php if(!empty($_list)): if(is_array($_list)): $i = 0; $__LIST__ = $_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($vo['children']): if(is_array($vo["children"])): $i = 0; $__LIST__ = $vo["children"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$k): $mod = ($i % 2 );++$i; if($k['children']): if(is_array($k["children"])): $i = 0; $__LIST__ = $k["children"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$kk): $mod = ($i % 2 );++$i;?><tr class="text-c">
				                            <td><input class="ids" type="checkbox" name="id" value="<?php echo ($vo["id_3rd"]); ?>"/></td>
				                            <td><?php echo ($vo["classify"]); ?></td>
				                            <td><?php echo ($k["classify"]); ?></td>
				                            <td><?php echo ($kk["classify"]); ?></td>
				                            <td>
				                                <?php if(isset($actions['CLASSIFYEDIT'])): ?><a class="ajaxget fontblue" href="<?php $str = $Think.ADMIN_PATH_NAME.$actions['CLASSIFYEDIT']['url'];echo U($str,array('key'=>$actions['CLASSIFYEDIT']['key'],'id'=>$kk['id']))?>">编辑</a><?php endif; ?>
				                                <?php if(isset($actions['CLASSIFYDELETE'])): ?><a class="ajaxget fontblue" href="javascript:" refresh="true"
				                                       _href="<?php $str = $Think.ADMIN_PATH_NAME.$actions['CLASSIFYDELETE']['url'];echo U($str,array('key'=>$actions['CLASSIFYDELETE']['key'],'id'=>$kk['id']))?>">删除</a><?php endif; ?>
				
				                            </td>
				                        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                    			<?php else: ?>
                    				<tr class="text-c">
			                            <td><input class="ids" type="checkbox" name="id" value="<?php echo ($vo["id_3rd"]); ?>"/></td>
			                            <td><?php echo ($vo["classify"]); ?></td>
			                            <td><?php echo ($k["classify"]); ?></td>
			                            <td></td>
			                            <td>
			                                <?php if(isset($actions['CLASSIFYEDIT'])): ?><a class="ajaxget fontblue" href="<?php $str = $Think.ADMIN_PATH_NAME.$actions['CLASSIFYEDIT']['url'];echo U($str,array('key'=>$actions['CLASSIFYEDIT']['key'],'id'=>$k['id']))?>">编辑</a><?php endif; ?>
			                                <?php if(isset($actions['CLASSIFYDELETE'])): ?><a class="ajaxget fontblue" href="javascript:" refresh="true"
			                                       _href="<?php $str = $Think.ADMIN_PATH_NAME.$actions['CLASSIFYDELETE']['url'];echo U($str,array('key'=>$actions['CLASSIFYDELETE']['key'],'id'=>$k['id']))?>">删除</a><?php endif; ?>
			
			                            </td>
			                        </tr><?php endif; endforeach; endif; else: echo "" ;endif; ?>
                    		
                    	<?php else: ?>
                    	
                    	<tr class="text-c">
                            <td><input class="ids" type="checkbox" name="id" value="<?php echo ($vo["id"]); ?>"/></td>
                            <td><?php echo ($vo["classify"]); ?></td>
                            <td></td>
                            <td></td>
                            <td>
                                <?php if(isset($actions['CLASSIFYEDIT'])): ?><a class="ajaxget fontblue" href="<?php $str = $Think.ADMIN_PATH_NAME.$actions['CLASSIFYEDIT']['url'];echo U($str,array('key'=>$actions['CLASSIFYEDIT']['key'],'id'=>$vo['id']))?>">编辑</a><?php endif; ?>
                                <?php if(isset($actions['CLASSIFYDELETE'])): ?><a class="ajaxget fontblue" href="javascript:" refresh="true"
                                       _href="<?php $str = $Think.ADMIN_PATH_NAME.$actions['CLASSIFYDELETE']['url'];echo U($str,array('key'=>$actions['CLASSIFYDELETE']['key'],'id'=>$vo['id']))?>">删除</a><?php endif; ?>

                            </td>
                        </tr><?php endif; endforeach; endif; else: echo "" ;endif; ?>
                    <?php else: ?>
                    <td colspan="9" class="text-center"> aOh! 暂时还没有内容!</td><?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>
    <div class="page">
        <?php echo ($_page); ?>
    </div>
    <link href="/Public/Admin/css/employee/employee.css" rel="stylesheet" type="text/css"/>

    <script src="/Public/Admin/js/Good/classify.js"></script>
    <script src="/Public/static/thinkbox/jquery.thinkbox.js"></script>

    <script type="text/javascript">
        //搜索功能
        $("#search").click(function () {
            var url = $(this).attr('url');
            var query = $('.search-form').find('input').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
            query = query.replace(/^&/g, '');
            if (url.indexOf('?') > 0) {
                url += '&' + query;
            } else {
                url += '?' + query;
            }
            window.location.href = url;
        });
        //回车搜索
        $(".search-input").keyup(function (e) {
            if (e.keyCode === 13) {
                $("#search").click();
                return false;
            }
        });

    </script>
</div>